package caiziyou.com.designpattern.decotator;

public abstract class Decorator extends Drink {

	private Drink drink;

	public Decorator(Drink drink) {
		this.drink = drink;
	}
	
	@Override
	public float cost() {
		
		return this.getPrice() + drink.cost();		
	}

	public Drink getDrink() {
		return drink;
	}

	public void setDrink(Drink drink) {
		this.drink = drink;
	}

	
	@Override
	public String getDescription() {
		return super.getDescription()+"  &&  "+drink.getDescription();
	}
	
}
